package com.intpro.demo.DAO.Mysql.Repository;

import com.intpro.demo.DAO.Mysql.Model.Expert;
import com.intpro.demo.DAO.Mysql.Model.LinkPaperAuthor;
import com.intpro.demo.DAO.Mysql.Model.Paper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface PaperRepository
{
	@Select("select * from paper where id=#{id}")
	public Paper getPaper(@Param("id")int id );

	@Select("select * from expert where id=#{id}")
	public Expert getExpert(@Param("id")int id);

	@Select("select * from linkPaperAuthor where PaperID=#{id}")
	public List<LinkPaperAuthor> getAllAuthor(@Param("id")int id );

	@Select("select * from linkPaperAuthor where AuthorID=#{id}")
	public List<LinkPaperAuthor> getAllPaper(@Param("id")int id );
}
